PORTNAME=	glade
PORTVERSION=	3.40.0
PORTREVISION=	2
CATEGORIES=	devel gnome
MASTER_SITES=	GNOME
DIST_SUBDIR=	gnome

MAINTAINER=	gnome@FreeBSD.org
COMMENT=	User interface builder for GTK+ 3
WWW=		https://glade.gnome.org/

LICENSE=	GPLv2+ LGPL21+
LICENSE_COMB=	multi
LICENSE_FILE_GPLv2+ =	${WRKSRC}/COPYING.GPL
LICENSE_FILE_LGPL21+ =	${WRKSRC}/COPYING.LGPL

BUILD_DEPENDS=	itstool:textproc/itstool \
		docbook-xsl>=0:textproc/docbook-xsl

PORTSCOUT=	limitw:1,even

USES=		compiler:c11 desktop-file-utils gettext gnome \
		localbase:ldflags meson pkgconfig tar:xz
USE_GNOME=	cairo gdkpixbuf2 gtk30 introspection:build libxslt:build

DOCSDIR=	${PREFIX}/share/doc/gladeui-2

# www/webkit2-gtk3 provides the 4.1 API
MESON_ARGS=	-Dwebkit2gtk=disabled

OPTIONS_SUB=		yes
OPTIONS_DEFINE=		GJS PYTHON
OPTIONS_DEFAULT=	GJS PYTHON

GJS_DESC=		GJS (JavaScript) support
GJS_MESON_ENABLED=	gjs
GJS_LIB_DEPENDS=	libgjs.so:lang/gjs

PYTHON_MESON_ENABLED=	python
PYTHON_USES=		python:3.7+
PYTHON_USE=		GNOME=pygobject3

.include <bsd.port.mk>
